package com.easylinkin.linkappapi.knowledgebase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easylinkin.linkappapi.knowledgebase.entity.KnowledgeType;
import com.easylinkin.linkappapi.knowledgebase.util.Node;
import com.easylinkin.linkappapi.knowledgebase.vo.KnowledgeTypeVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 知识类别表 Mapper 接口
 * </p>
 *
 * @author xy
 * @since 2021-12-02
 */
public interface KnowledgeTypeMapper extends BaseMapper<KnowledgeType> {

  List<KnowledgeType> findTypeByKnowledgeId(Long knowledgeId);

  int countNameByCondition(KnowledgeType knowledgeType);

  List<KnowledgeTypeVO> listAll(@Param("type") KnowledgeType knowledgeType);

  List<Node> findAllNodeByTenantId(String tenantId);
}
